﻿using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;

namespace Knihkupectvo.ImportFaktur
{
    internal sealed class Faktura
    {
        public decimal CenaCelkem { get; private set; }
        public DateTime Splatnost { get; private set; }
        public DateTime Vystaveni { get; private set; }
        public string ID { get; private set; }
        public string Odesilatel { get; private set; }
        public string Prijemce { get; private set; }

        private string _urlFaktura { get; set; }

        public Faktura(decimal cenacelkem, DateTime splatnost, DateTime vystaveni, string prijemce, string odesilatel, string urlfaktura)
        {
            this.CenaCelkem = cenacelkem;
            this.Splatnost = splatnost;
            this.Vystaveni = vystaveni;
            this.ID = DateTime.UtcNow.ToString() ;
            this.Odesilatel = odesilatel;
            this.Prijemce = prijemce;
            this._urlFaktura = urlfaktura;
        }

        //public void ZobrazitFakturu()
        //{         
        //    Process p = new Process();
        //    ProcessStartInfo pi = new ProcessStartInfo();
        //    pi.UseShellExecute = true;
        //    pi.FileName = this._urlFaktura;
        //    p.StartInfo = pi;

        //    try
        //    {
        //        p.Start();
        //    }
        //    catch (Exception Ex)
        //    {
        //        //MessageBox.Show(Ex.Message);
        //    };          
        //}
    }
}
